package uiLayer;

import java.util.ArrayList;
import java.util.List;

import javax.swing.JTabbedPane;

import controlLayer.OrderCtr;

public class SaleTabbedPane extends JTabbedPane {
	
	private OrderCtr orderCtr;
	private SaleTab1 saleTab1;
	private SaleTab2 saleTab2;
	private SaleTab3 saleTab3;
	private List<OrderLineWrapper> orderLines = new ArrayList<>();
	
	public SaleTabbedPane(){
		orderCtr = new OrderCtr();
		this.saleTab1 = new SaleTab1(orderLines, this.orderCtr);
		this.add("Varer", this.saleTab1);
		
		this.saleTab2 = new SaleTab2(this.orderCtr);
		this.add("Kunde", this.saleTab2);
		
		this.saleTab3 = new SaleTab3(orderLines, this.orderCtr);
		this.add("Ordre", this.saleTab3);
	}

	/**
	 * @return the orderCtr
	 */
	protected OrderCtr getOrderCtr() {
		return orderCtr;
	}

	/**
	 * @param orderCtr the orderCtr to set
	 */
	protected void setOrderCtr(OrderCtr orderCtr) {
		this.orderCtr = orderCtr;
	}
}
